package com.lwg.datastructure.greedy;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.regex.Matcher;

/**
 * @FileName: PointsOfCandy.java
 * @Description: 分糖果
 * Copyright: Copyright(C) 2020-2022
 * Company  : Sunyard.hangzhou
 * @author: 李炜光
 * @slogan:
 * @Date: 2022/2/14 0014
 */
public class PointsOfCandy {
    public int distributeCandies(int[] candyType) {
        //糖果的数量
        int n = candyType.length;
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            set.add(candyType[i]);
        }
        int CandyDiff = Math.min(set.size(), n >> 1);
        return CandyDiff;
    }
}

class MainClass {
    public static int[] stringToIntegerArray(String input) {
        input = input.trim();
        input = input.substring(1, input.length() - 1);
        if (input.length() == 0) {
            return new int[0];
        }

        String[] parts = input.split(",");
        int[] output = new int[parts.length];
        for (int index = 0; index < parts.length; index++) {
            String part = parts[index].trim();
            output[index] = Integer.parseInt(part);
        }
        return output;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = in.readLine()) != null) {
            int[] candyType = stringToIntegerArray(line);

            int ret = new PointsOfCandy().distributeCandies(candyType);

            String out = String.valueOf(ret);

            System.out.print(out);
        }
    }
}